4 // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
6 // The use and distribution terms for this software are contained in the file
7 // named license.txt, which can be found in the root of this distribution.
8 // By using this software in any fashion, you are agreeing to be bound by the
9 // terms of this license.
11 // You must not remove this notice, or any other, from this software.
16 namespace Microsoft
.JScript
{
20 public sealed class LenientDatePrototype
: DatePrototype
{
21 public new Object constructor
;
22 public new Object getTime
;
23 [NotRecommended ("getYear")]
24 public new Object getYear
;
25 public new Object getFullYear
;
26 public new Object getUTCFullYear
;
27 public new Object getMonth
;
28 public new Object getUTCMonth
;
29 public new Object getDate
;
30 public new Object getUTCDate
;
31 public new Object getDay
;
32 public new Object getUTCDay
;
33 public new Object getHours
;
34 public new Object getUTCHours
;
35 public new Object getMinutes
;
36 public new Object getUTCMinutes
;
37 public new Object getSeconds
;
38 public new Object getUTCSeconds
;
39 public new Object getMilliseconds
;
40 public new Object getUTCMilliseconds
;
41 public new Object getVarDate
;
42 public new Object getTimezoneOffset
;
43 public new Object setTime
;
44 public new Object setMilliseconds
;
45 public new Object setUTCMilliseconds
;
46 public new Object setSeconds
;
47 public new Object setUTCSeconds
;
48 public new Object setMinutes
;
49 public new Object setUTCMinutes
;
50 public new Object setHours
;
51 public new Object setUTCHours
;
52 public new Object setDate
;
53 public new Object setUTCDate
;
54 public new Object setMonth
;
55 public new Object setUTCMonth
;
56 public new Object setFullYear
;
57 public new Object setUTCFullYear
;
58 [NotRecommended ("setYear")]
59 public new Object setYear
;
60 [NotRecommended ("toGMTString")]
61 public new Object toGMTString
;
62 public new Object toDateString
;
63 public new Object toLocaleDateString
;
64 public new Object toLocaleString
;
65 public new Object toLocaleTimeString
;
66 public new Object toString
;
67 public new Object toTimeString
;
68 public new Object toUTCString
;
69 public new Object valueOf
;
71 internal LenientDatePrototype(LenientFunctionPrototype funcprot
, LenientObjectPrototype parent
)
73 this.noExpando
= false;
75 //this.constructor is given a value by the proper constructor class
76 Type super
= typeof(DatePrototype
);
77 this.getTime
= new BuiltinFunction("getTime", this, super
.GetMethod("getTime"), funcprot
);
78 this.getYear
= new BuiltinFunction("getYear", this, super
.GetMethod("getYear"), funcprot
);
79 this.getFullYear
= new BuiltinFunction("getFullYear", this, super
.GetMethod("getFullYear"), funcprot
);
80 this.getUTCFullYear
= new BuiltinFunction("getUTCFullYear", this, super
.GetMethod("getUTCFullYear"), funcprot
);
81 this.getMonth
= new BuiltinFunction("getMonth", this, super
.GetMethod("getMonth"), funcprot
);
82 this.getUTCMonth
= new BuiltinFunction("getUTCMonth", this, super
.GetMethod("getUTCMonth"), funcprot
);
83 this.getDate
= new BuiltinFunction("getDate", this, super
.GetMethod("getDate"), funcprot
);
84 this.getUTCDate
= new BuiltinFunction("getUTCDate", this, super
.GetMethod("getUTCDate"), funcprot
);
85 this.getDay
= new BuiltinFunction("getDay", this, super
.GetMethod("getDay"), funcprot
);
86 this.getUTCDay
= new BuiltinFunction("getUTCDay", this, super
.GetMethod("getUTCDay"), funcprot
);
87 this.getHours
= new BuiltinFunction("getHours", this, super
.GetMethod("getHours"), funcprot
);
88 this.getUTCHours
= new BuiltinFunction("getUTCHours", this, super
.GetMethod("getUTCHours"), funcprot
);
89 this.getMinutes
= new BuiltinFunction("getMinutes", this, super
.GetMethod("getMinutes"), funcprot
);
90 this.getUTCMinutes
= new BuiltinFunction("getUTCMinutes", this, super
.GetMethod("getUTCMinutes"), funcprot
);
91 this.getSeconds
= new BuiltinFunction("getSeconds", this, super
.GetMethod("getSeconds"), funcprot
);
92 this.getUTCSeconds
= new BuiltinFunction("getUTCSeconds", this, super
.GetMethod("getUTCSeconds"), funcprot
);
93 this.getMilliseconds
= new BuiltinFunction("getMilliseconds", this, super
.GetMethod("getMilliseconds"), funcprot
);
94 this.getUTCMilliseconds
= new BuiltinFunction("getUTCMilliseconds", this, super
.GetMethod("getUTCMilliseconds"), funcprot
);
95 this.getVarDate
= new BuiltinFunction("getVarDate", this, super
.GetMethod("getVarDate"), funcprot
);
96 this.getTimezoneOffset
= new BuiltinFunction("getTimezoneOffset", this, super
.GetMethod("getTimezoneOffset"), funcprot
);
97 this.setTime
= new BuiltinFunction("setTime", this, super
.GetMethod("setTime"), funcprot
);
98 this.setMilliseconds
= new BuiltinFunction("setMilliseconds", this, super
.GetMethod("setMilliseconds"), funcprot
);
99 this.setUTCMilliseconds
= new BuiltinFunction("setUTCMilliseconds", this, super
.GetMethod("setUTCMilliseconds"), funcprot
);
100 this.setSeconds
= new BuiltinFunction("setSeconds", this, super
.GetMethod("setSeconds"), funcprot
);
101 this.setUTCSeconds
= new BuiltinFunction("setUTCSeconds", this, super
.GetMethod("setUTCSeconds"), funcprot
);
102 this.setMinutes
= new BuiltinFunction("setMinutes", this, super
.GetMethod("setMinutes"), funcprot
);
103 this.setUTCMinutes
= new BuiltinFunction("setUTCMinutes", this, super
.GetMethod("setUTCMinutes"), funcprot
);
104 this.setHours
= new BuiltinFunction("setHours", this, super
.GetMethod("setHours"), funcprot
);
105 this.setUTCHours
= new BuiltinFunction("setUTCHours", this, super
.GetMethod("setUTCHours"), funcprot
);
106 this.setDate
= new BuiltinFunction("setDate", this, super
.GetMethod("setDate"), funcprot
);
107 this.setUTCDate
= new BuiltinFunction("setUTCDate", this, super
.GetMethod("setUTCDate"), funcprot
);
108 this.setMonth
= new BuiltinFunction("setMonth", this, super
.GetMethod("setMonth"), funcprot
);
109 this.setUTCMonth
= new BuiltinFunction("setUTCMonth", this, super
.GetMethod("setUTCMonth"), funcprot
);
110 this.setFullYear
= new BuiltinFunction("setFullYear", this, super
.GetMethod("setFullYear"), funcprot
);
111 this.setUTCFullYear
= new BuiltinFunction("setUTCFullYear", this, super
.GetMethod("setUTCFullYear"), funcprot
);
112 this.setYear
= new BuiltinFunction("setYear", this, super
.GetMethod("setYear"), funcprot
);
113 this.toDateString
= new BuiltinFunction("toDateString", this, super
.GetMethod("toDateString"), funcprot
);
114 this.toLocaleDateString
= new BuiltinFunction("toLocaleDateString", this, super
.GetMethod("toLocaleDateString"), funcprot
);
115 this.toLocaleString
= new BuiltinFunction("toLocaleString", this, super
.GetMethod("toLocaleString"), funcprot
);
116 this.toLocaleTimeString
= new BuiltinFunction("toLocaleTimeString", this, super
.GetMethod("toLocaleTimeString"), funcprot
);
117 this.toGMTString
= new BuiltinFunction("toUTCString", this, super
.GetMethod("toUTCString"), funcprot
);
118 this.toString
= new BuiltinFunction("toString", this, super
.GetMethod("toString"), funcprot
);
119 this.toTimeString
= new BuiltinFunction("toTimeString", this, super
.GetMethod("toTimeString"), funcprot
);
120 this.toUTCString
= new BuiltinFunction("toUTCString", this, super
.GetMethod("toUTCString"), funcprot
);
121 this.valueOf
= new BuiltinFunction("valueOf", this, super
.GetMethod("valueOf"), funcprot
);